<template>
  <router-view />
  <transition name="van-fade">
    <loading v-show="isShowLoadding" />
  </transition>
</template>

<script setup>
import { storeToRefs } from "pinia";
import pinia from '@/store/store'
import { useStore } from '@/store/index'
const user = useStore(pinia);
import { useRoute, useRouter } from "vue-router";
import { onMounted } from 'vue'
let route = useRoute()
const { isShowLoadding } = storeToRefs(user)
// user.$patch(state => {
//   state.isShowLoadding = true
// })
onMounted(() => {

  //ios下返回做下刷新{很重要}
    window.addEventListener('pageshow', function(e) {
    // 通过persisted属性判断是否存在 BF Cache
      if (e.persisted) {
        window.location.reload()
      }
    })
})
import loading from '@/components/loading.vue'
</script>
<style lang="scss" scoped>

</style>
